define at3_cvmfs($squidproxy,$repositories="atlas,atlas-condb",$quota=24990) {

  include cvmfs
  
  exec { "create_dir_locald":
    command => "mkdir -p /etc/cvmfs/local.d",
  }
  
  file { "/etc/cvmfs/local.d/default.conf":
    owner => "root",
    group => "root",
    mode => 644,
    content => template("at3_cvmfs/default.conf.tpl"),
    require => Exec["create_dir_locald"],
    notify => Service["cvmfs"],
  }

}

class fuse {
  package { ["fuse"]:
    ensure => installed,
  }
}
  
class cvmfs {
  include fuse
  
  package { ["cvmfs","cvmfs-init-scripts"]:
    ensure => installed,
    require => Package["fuse"]
  }
  
  service { [ "cvmfs"]:
    hasstatus => true,
    hasrestart => true,
    ensure => running,
    enable => true,
    require => Package["cvmfs","cvmfs-init-scripts"],
  }
}
